<template>
  <a-modal
    :visible="visible"
    :confirm-loading="confirmLoading"
    width="30%"
    @ok="handleOk"
    @cancel="handleCancel"
    :title="dalete.titles"
    :cancelText="$t('m.Cancel')"
    :okText="$t('m.Ok')"
  >
    <p><a-icon :type="dalete.type" />{{ dalete.text }}</p>
  </a-modal>
</template>

<script>
export default {
  name: "Delete",
  props: {
    dalete: {
      type: Object,
    },
  },
  data() {
    return {
      visible: false,
      confirmLoading: false,
    };
  },
  methods: {
    showModal() {
      this.visible = true;
    },
    handleOk() {
      this.$emit("confirm");
    },
    // 取消
    handleCancel() {
      this.visible = false;
    },
  },
};
</script>

<style scoped lang="scss">
/deep/ #rcDialogTitle5 {
  font-size: 20px;
  color: black;
}
/deep/ .ant-modal-body {
  color: #999;
  text-align: left;
}
.exclamation-point {
  color: rgb(255, 232, 77);
  margin-right: 10px;
}
</style>